<?php

namespace App\Models;

class City extends Base
{
    protected $primaryKey = 'code';

    public static function get_code_by_name($name) {
        return self::where('name', $name)->value('code');
    }
}
